<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">
<link href="style.css" type="text/css" rel="stylesheet">
<title>PUNPCKHBW/PUNPCKHWD/PUNPCKHDQ/PUNPCKHQDQ— Unpack High Data </title></head>
<body>
<h1>PUNPCKHBW/PUNPCKHWD/PUNPCKHDQ/PUNPCKHQDQ— Unpack High Data</h1>
<table>
<tr>
<th>Opcode/Instruction</th>
<th>Op/En</th>
<th>64/32 bit Mode Support</th>
<th>CPUID Feature Flag</th>
<th>Description</th></tr>
<tr>
<td>
<p>0F 68 /<em>r</em><sup>1</sup></p>
<p>PUNPCKHBW <em>mm, mm/m64</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>MMX</td>
<td>Unpack and interleave high-order bytes from <em>mm</em> and <em>mm/m64</em> into <em>mm</em>.</td></tr>
<tr>
<td>
<p>66 0F 68 /<em>r</em></p>
<p>PUNPCKHBW <em>xmm1</em>, <em>xmm2/m128</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>SSE2</td>
<td>Unpack and interleave high-order bytes from <em>xmm1</em> and <em>xmm2/m128</em> into <em>xmm1</em>.</td></tr>
<tr>
<td>
<p>0F 69 /<em>r</em><sup>1</sup></p>
<p>PUNPCKHWD <em>mm, mm/m64</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>MMX</td>
<td>Unpack and interleave high-order words from <em>mm</em> and <em>mm/m64</em> into <em>mm</em>.</td></tr>
<tr>
<td>
<p>66 0F 69 /<em>r</em></p>
<p>PUNPCKHWD <em>xmm1</em>, <em>xmm2/m128</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>SSE2</td>
<td>Unpack and interleave high-order words from <em>xmm1</em> and <em>xmm2/m128</em> into <em>xmm1</em>.</td></tr>
<tr>
<td>
<p>0F 6A /<em>r</em><sup>1</sup></p>
<p>PUNPCKHDQ <em>mm,</em> <em>mm/m64</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>MMX</td>
<td>Unpack and interleave high-order doublewords from <em>mm</em> and <em>mm/m64</em> into <em>mm</em>.</td></tr>
<tr>
<td>
<p>66 0F 6A /<em>r</em></p>
<p>PUNPCKHDQ <em>xmm1</em>, <em>xmm2/m128</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>SSE2</td>
<td>Unpack and interleave high-order doublewords from <em>xmm1</em> and <em>xmm2/m128 </em>into <em>xmm1</em>.</td></tr>
<tr>
<td>
<p>66 0F 6D /<em>r</em></p>
<p>PUNPCKHQDQ <em>xmm1</em>, <em>xmm2/m128</em></p></td>
<td>RM</td>
<td>V/V</td>
<td>SSE2</td>
<td>Unpack and interleave high-order quadwords from <em>xmm1</em> and <em>xmm2/m128</em> into <em>xmm1.</em></td></tr>
<tr>
<td>
<p>VEX.NDS.128.66.0F.WIG 68/r</p>
<p>VPUNPCKHBW <em>xmm1,xmm2, xmm3/m128</em></p></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Interleave high-order bytes from <em>xmm2</em> and <em>xmm3/m128</em> into <em>xmm1</em>.</td></tr>
<tr>
<td>
<p>VEX.NDS.128.66.0F.WIG 69/r</p>
<p>VPUNPCKHWD <em>xmm1,xmm2, xmm3/m128</em></p></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Interleave high-order words from <em>xmm2</em> and <em>xmm3/m128</em> into <em>xmm1</em>.</td></tr>
<tr>
<td>
<p>VEX.NDS.128.66.0F.WIG 6A/r</p>
<p>VPUNPCKHDQ <em>xmm1, xmm2, xmm3/m128</em></p></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Interleave high-order doublewords from <em>xmm2</em> and <em>xmm3/m128</em> into <em>xmm1</em>.</td></tr>
<tr>
<td>VEX.NDS.128.66.0F.WIG 6D/r VPUNPCKHQDQ<em> xmm1, xmm2, xmm3/m128</em></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX</td>
<td>Interleave high-order quadword from <em>xmm2 </em>and <em>xmm3/m128</em> into<em> xmm1</em> register.</td></tr>
<tr>
<td>VEX.NDS.256.66.0F.WIG 68 /r VPUNPCKHBW <em>ymm1, ymm2, ymm3/m256</em></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Interleave high-order bytes from <em>ymm2</em> and <em>ymm3/m256</em> into <em>ymm1</em> register.</td></tr>
<tr>
<td>VEX.NDS.256.66.0F.WIG 69 /r VPUNPCKHWD <em>ymm1, ymm2, ymm3/m256</em></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Interleave high-order words from <em>ymm2</em> and <em>ymm3/m256</em> into <em>ymm1</em> register.</td></tr>
<tr>
<td>VEX.NDS.256.66.0F.WIG 6A /r VPUNPCKHDQ <em>ymm1, ymm2, ymm3/m256</em></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Interleave high-order doublewords from <em>ymm2</em> and <em>ymm3/m256</em> into <em>ymm1</em> register.</td></tr>
<tr>
<td>VEX.NDS.256.66.0F.WIG 6D /r VPUNPCKHQDQ <em>ymm1, ymm2, ymm3/m256</em></td>
<td>RVM</td>
<td>V/V</td>
<td>AVX2</td>
<td>Interleave high-order quadword from <em>ymm2 </em>and <em>ymm3/m256</em> into <em>ymm1</em> register.</td></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F.WIG 68 /r</p>
<p>VPUNPCKHBW xmm1 {k1}{z}, xmm2, xmm3/m128</p></td>
<td>FVM</td>
<td>V/V</td>
<td>AVX512VL AVX512BW</td>
<td>Interleave high-order bytes from xmm2 and xmm3/m128 into xmm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F.WIG 69 /r</p>
<p>VPUNPCKHWD xmm1 {k1}{z}, xmm2, xmm3/m128</p></td>
<td>FVM</td>
<td>V/V</td>
<td>AVX512VL AVX512BW</td>
<td>Interleave high-order words from xmm2 and xmm3/m128 into xmm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.128.66.0F.W0 6A /r</p>
<p>VPUNPCKHDQ xmm1 {k1}{z}, xmm2, xmm3/m128/m32bcst</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Interleave high-order doublewords from xmm2 and xmm3/m128/m32bcst into xmm1 register using k1 write mask.</td></tr></table>
<table>
<tr>
<td>
<p>EVEX.NDS.128.66.0F.W1 6D /r</p>
<p>VPUNPCKHQDQ xmm1 {k1}{z}, xmm2, xmm3/m128/m64bcst</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Interleave high-order quadword from xmm2 and xmm3/m128/m64bcst into xmm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F.WIG 68 /r</p>
<p>VPUNPCKHBW ymm1 {k1}{z}, ymm2, ymm3/m256</p></td>
<td>FVM</td>
<td>V/V</td>
<td>AVX512VL AVX512BW</td>
<td>Interleave high-order bytes from ymm2 and ymm3/m256 into ymm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F.WIG 69 /r</p>
<p>VPUNPCKHWD ymm1 {k1}{z}, ymm2, ymm3/m256</p></td>
<td>FVM</td>
<td>V/V</td>
<td>AVX512VL AVX512BW</td>
<td>Interleave high-order words from ymm2 and ymm3/m256 into ymm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F.W0 6A /r</p>
<p>VPUNPCKHDQ ymm1 {k1}{z}, ymm2, ymm3/m256/m32bcst</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512VL AVX512F</td>
<td>Interleave high-order doublewords from ymm2 and ymm3/m256/m32bcst into ymm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.256.66.0F.W1 6D /r</p>
<p>VPUNPCKHQDQ ymm1 {k1}{z}, ymm2, ymm3/m256/m64bcst</p>
<p>EVEX.NDS.512.66.0F.WIG 68/r</p>
<p>VPUNPCKHBW zmm1 {k1}{z}, zmm2, zmm3/m512</p>
<p>EVEX.NDS.512.66.0F.WIG 69/r</p>
<p>VPUNPCKHWD zmm1 {k1}{z}, zmm2, zmm3/m512</p></td>
<td>
<p>FV</p>
<p>FVM</p>
<p>FVM</p></td>
<td>
<p>V/V</p>
<p>V/V</p>
<p>V/V</p></td>
<td>
<p>AVX512VL AVX512F</p>
<p>AVX512BW Interleave high-order bytes from zmm2 and</p>
<p>AVX512BW Interleave high-order words from zmm2 and</p></td>
<td>
<p>Interleave high-order quadword from ymm2 and ymm3/m256/m64bcst into ymm1 register using k1 write mask.</p>
<p>zmm3/m512 into zmm1 register.</p>
<p>zmm3/m512 into zmm1 register.</p></td></tr>
<tr>
<td>
<p>EVEX.NDS.512.66.0F.W0 6A /r</p>
<p>VPUNPCKHDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m32bcst</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Interleave high-order doublewords from zmm2 and zmm3/m512/m32bcst into zmm1 register using k1 write mask.</td></tr>
<tr>
<td>
<p>EVEX.NDS.512.66.0F.W1 6D /r</p>
<p>VPUNPCKHQDQ zmm1 {k1}{z}, zmm2, zmm3/m512/m64bcst</p></td>
<td>FV</td>
<td>V/V</td>
<td>AVX512F</td>
<td>Interleave high-order quadword from zmm2 and zmm3/m512/m64bcst into zmm1 register using k1 write mask.</td></tr></table>
<p>NOTES:</p>
<p>1. See note in Section 2.4, “AVX and SSE Instruction Exception Specification” in the <em>Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2A</em> and Section 22.25.3, “Exception Conditions of Legacy SIMD Instructions Operating on MMX Registers” in the <em>Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A</em>.</p>
<h3>Instruction Operand Encoding</h3>
<table>
<tr>
<td>Op/En</td>
<td>Operand 1</td>
<td>Operand 2</td>
<td>Operand 3</td>
<td>Operand 4</td></tr>
<tr>
<td>RM</td>
<td>ModRM:reg (r, w)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td>
<td>NA</td></tr>
<tr>
<td>RVM</td>
<td>ModRM:reg (w)</td>
<td>VEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr>
<tr>
<td>FVM</td>
<td>ModRM:reg (w)</td>
<td>EVEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr>
<tr>
<td>FV</td>
<td>ModRM:reg (w)</td>
<td>EVEX.vvvv (r)</td>
<td>ModRM:r/m (r)</td>
<td>NA</td></tr></table>
<h2>Description</h2>
<p>Unpacks and interleaves the high-order data elements (bytes, words, doublewords, or quadwords) of the destina-tion operand (first operand) and source operand (second operand) into the destination operand. Figure 4-20 shows the unpack operation for bytes in 64-bit operands. The low-order data elements are ignored.</p>
<svg width="568.799985" viewBox="112.380000 813466.020010 379.199990 97.260000" height="145.89">
<text y="813486.887788" x="126.8997" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="16.8642064">SRC</text>
<text y="813487.248188" x="454.7984" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="21.3263808">DEST</text>
<text y="813549.768188" x="140.82" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="21.3263808">DEST</text>
<rect y="813538.74" x="164.4" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="144.0"></rect>
<rect y="813475.98" x="308.46" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="144.0"></rect>
<rect y="813476.1" x="146.22" style="fill:rgba(0,0,0,0);stroke:rgb(0,0,0);stroke-width:1pt;" height="18.0" width="144.0"></rect>
<path style="stroke:black" d="M317.460000,813493.980000 L317.700000,813493.920000 L317.520000,813493.440000 L317.280000,813493.500000 "></path>
<path style="stroke:black" d="M353.940000,813493.980000 L354.120000,813493.860000 L353.880000,813493.440000 L353.700000,813493.560000 "></path>
<path style="stroke:black" d="M371.040000,813493.980000 L371.220000,813493.860000 L370.980000,813493.440000 L370.800000,813493.560000 "></path>
<path style="stroke:black" d="M317.460000,813493.980000 L317.280000,813493.500000 L198.660000,813535.920000 L198.840000,813536.400000 "></path>
<path style="stroke:black" d="M335.160000,813493.980000 L335.340000,813493.920000 L335.160000,813493.500000 L334.980000,813493.560000 "></path>
<path style="stroke:black" d="M335.160000,813493.980000 L334.980000,813493.560000 L235.440000,813535.620000 L235.620000,813536.040000 "></path>
<path style="stroke:black" d="M353.940000,813493.980000 L353.700000,813493.560000 L270.000000,813535.140000 L270.240000,813535.560000 "></path>
<path style="stroke:black" d="M371.040000,813493.980000 L370.800000,813493.560000 L305.040000,813534.540000 L305.280000,813534.960000 "></path>
<path style="stroke:black" d="M172.380000,813494.160000 L172.260000,813493.980000 L171.900000,813494.280000 L172.020000,813494.460000 "></path>
<path style="stroke:black" d="M190.560000,813494.100000 L190.380000,813493.980000 L190.080000,813494.340000 L190.260000,813494.460000 "></path>
<path style="stroke:black" d="M156.360000,813494.220000 L156.300000,813494.040000 L155.880000,813494.220000 L155.940000,813494.400000 "></path>
<path style="stroke:black" d="M190.560000,813494.100000 L190.260000,813494.460000 L239.460000,813534.120000 L239.760000,813533.760000 "></path>
<path style="stroke:black" d="M172.380000,813494.160000 L172.020000,813494.460000 L204.060000,813533.040000 L204.420000,813532.740000 "></path>
<path style="stroke:black" d="M156.360000,813494.220000 L155.940000,813494.400000 L170.760000,813531.720000 L171.180000,813531.540000 "></path>
<path style="stroke:black" d="M209.820000,813494.640000 L209.640000,813494.520000 L209.400000,813494.940000 L209.580000,813495.060000 "></path>
<path style="stroke:black" d="M209.820000,813494.640000 L209.580000,813495.060000 L273.720000,813534.960000 L273.960000,813534.540000 "></path>
<path style="stroke:black" d="M171.000000,813532.260000 L172.200000,813531.180000 L172.980000,813530.460000 L173.100000,813531.540000 L173.640000,813537.060000 L173.760000,813538.740000 L172.740000,813537.420000 L169.320000,813533.040000 L168.660000,813532.200000 L169.680000,813532.140000 L170.100000,813532.380000 L173.520000,813536.760000 L172.740000,813537.420000 L172.620000,813537.120000 L172.080000,813531.600000 L173.100000,813531.540000 L172.920000,813531.900000 L171.720000,813532.980000 "></path>
<path style="stroke:black" d="M204.480000,813533.400000 L205.320000,813532.020000 L205.800000,813531.120000 L206.220000,813532.080000 L208.440000,813537.180000 L209.100000,813538.740000 L207.720000,813537.780000 L203.100000,813534.660000 L202.260000,813534.120000 L203.100000,813533.820000 L203.640000,813533.820000 L208.260000,813536.940000 L207.720000,813537.780000 L207.540000,813537.600000 L205.320000,813532.500000 L206.220000,813532.080000 L206.160000,813532.500000 L205.320000,813533.880000 "></path>
<path style="stroke:black" d="M171.360000,813532.620000 L172.560000,813531.540000 L173.100000,813537.060000 L169.680000,813532.680000 "></path>
<path style="stroke:black" d="M171.180000,813531.540000 L170.700000,813531.660000 L171.120000,813532.680000 L171.600000,813532.560000 "></path>
<path style="stroke:black" d="M171.180000,813531.540000 L171.240000,813531.720000 L170.820000,813531.900000 L170.760000,813531.720000 "></path>
<path style="stroke:black" d="M239.940000,813534.420000 L240.480000,813532.860000 L240.780000,813531.900000 L241.380000,813532.800000 L244.560000,813537.360000 L245.580000,813538.740000 L243.960000,813538.080000 L238.800000,813535.920000 L237.840000,813535.500000 L238.740000,813535.020000 L239.160000,813535.020000 L244.320000,813537.180000 L243.960000,813538.080000 L243.720000,813537.900000 L240.540000,813533.340000 L241.380000,813532.800000 L241.440000,813533.220000 L240.900000,813534.780000 "></path>
<path style="stroke:black" d="M169.680000,813532.140000 L171.360000,813532.080000 L171.720000,813532.980000 L171.540000,813533.100000 L171.360000,813533.160000 L169.680000,813533.220000 "></path>
<path style="stroke:black" d="M204.900000,813533.640000 L205.740000,813532.260000 L207.960000,813537.360000 L203.340000,813534.240000 "></path>
<path style="stroke:black" d="M274.260000,813535.140000 L274.620000,813533.520000 L274.800000,813532.560000 L275.520000,813533.340000 L279.300000,813537.540000 L280.440000,813538.800000 L278.760000,813538.320000 L273.360000,813536.760000 L272.340000,813536.520000 L273.180000,813535.860000 L273.660000,813535.800000 L279.060000,813537.360000 L278.760000,813538.320000 L278.520000,813538.200000 L274.740000,813534.000000 L275.520000,813533.340000 L275.580000,813533.760000 L275.220000,813535.380000 "></path>
<path style="stroke:black" d="M304.560000,813534.840000 L305.820000,813535.860000 L306.660000,813536.520000 L305.640000,813536.760000 L300.240000,813538.260000 L298.560000,813538.740000 L299.700000,813537.480000 L303.480000,813533.340000 L304.200000,813532.560000 L304.380000,813533.520000 L304.260000,813534.000000 L300.480000,813538.140000 L299.700000,813537.480000 L299.940000,813537.300000 L305.340000,813535.800000 L305.640000,813536.760000 L305.220000,813536.700000 L303.960000,813535.680000 "></path>
<path style="stroke:black" d="M204.420000,813532.680000 L204.060000,813533.040000 L204.720000,813533.820000 L205.080000,813533.460000 "></path>
<path style="stroke:black" d="M204.420000,813532.740000 L204.540000,813532.920000 L204.180000,813533.220000 L204.060000,813533.040000 "></path>
<path style="stroke:black" d="M240.420000,813534.600000 L240.960000,813533.040000 L244.140000,813537.600000 L238.980000,813535.440000 "></path>
<path style="stroke:black" d="M269.520000,813535.440000 L270.720000,813536.580000 L271.500000,813537.240000 L270.420000,813537.420000 L264.960000,813538.440000 L263.280000,813538.740000 L264.540000,813537.600000 L268.620000,813533.820000 L269.400000,813533.100000 L269.460000,813534.120000 L269.280000,813534.540000 L265.200000,813538.320000 L264.540000,813537.600000 L264.780000,813537.480000 L270.240000,813536.460000 L270.420000,813537.420000 L270.000000,813537.300000 L268.800000,813536.160000 "></path>
<path style="stroke:black" d="M203.100000,813533.820000 L204.660000,813533.220000 L205.320000,813533.880000 L205.260000,813534.060000 L205.080000,813534.120000 L203.520000,813534.720000 "></path>
<path style="stroke:black" d="M234.900000,813535.800000 L236.040000,813537.060000 L236.760000,813537.840000 L235.680000,813537.960000 L230.100000,813538.620000 L228.360000,813538.800000 L229.740000,813537.720000 L234.120000,813534.180000 L234.960000,813533.520000 L235.020000,813534.540000 L234.780000,813534.960000 L230.400000,813538.500000 L229.740000,813537.720000 L230.040000,813537.600000 L235.620000,813536.940000 L235.680000,813537.960000 L235.320000,813537.780000 L234.180000,813536.520000 "></path>
<path style="stroke:black" d="M304.380000,813533.520000 L304.740000,813535.140000 L303.960000,813535.680000 L303.780000,813535.560000 L303.780000,813535.380000 L303.420000,813533.760000 "></path>
<path style="stroke:black" d="M274.740000,813535.260000 L275.100000,813533.640000 L278.880000,813537.840000 L273.480000,813536.280000 "></path>
<path style="stroke:black" d="M304.260000,813535.260000 L305.520000,813536.280000 L300.120000,813537.780000 L303.900000,813533.640000 "></path>
<path style="stroke:black" d="M239.760000,813533.760000 L239.400000,813534.120000 L240.240000,813534.780000 L240.600000,813534.420000 "></path>
<path style="stroke:black" d="M239.760000,813533.760000 L239.940000,813533.880000 L239.640000,813534.240000 L239.460000,813534.120000 "></path>
<path style="stroke:black" d="M198.120000,813536.160000 L199.140000,813537.420000 L199.800000,813538.260000 L198.720000,813538.320000 L193.140000,813538.680000 L191.400000,813538.740000 L192.840000,813537.720000 L197.340000,813534.480000 L198.240000,813533.880000 L198.240000,813534.900000 L198.000000,813535.320000 L193.440000,813538.560000 L192.840000,813537.720000 L193.080000,813537.660000 L198.660000,813537.300000 L198.720000,813538.320000 L198.300000,813538.140000 L197.280000,813536.880000 "></path>
<path style="stroke:black" d="M269.460000,813534.120000 L269.700000,813535.740000 L268.800000,813536.160000 L268.680000,813536.040000 L268.680000,813535.860000 L268.500000,813534.240000 "></path>
<path style="stroke:black" d="M238.740000,813535.020000 L240.180000,813534.180000 L240.900000,813534.780000 L240.840000,813534.960000 L240.660000,813535.020000 L239.220000,813535.860000 "></path>
<path style="stroke:black" d="M269.160000,813535.800000 L270.360000,813536.940000 L264.900000,813537.960000 L268.980000,813534.180000 "></path>
<path style="stroke:black" d="M234.540000,813536.160000 L235.680000,813537.420000 L230.100000,813538.080000 L234.480000,813534.540000 "></path>
<path style="stroke:black" d="M235.020000,813534.540000 L235.080000,813536.160000 L234.180000,813536.520000 L234.060000,813536.340000 L234.000000,813536.160000 L233.940000,813534.540000 "></path>
<path style="stroke:black" d="M273.960000,813534.540000 L273.720000,813534.900000 L274.620000,813535.440000 L274.860000,813535.080000 "></path>
<path style="stroke:black" d="M273.960000,813534.540000 L274.140000,813534.660000 L273.900000,813535.080000 L273.720000,813534.960000 "></path>
<path style="stroke:black" d="M305.280000,813534.900000 L305.040000,813534.540000 L304.140000,813535.080000 L304.380000,813535.440000 "></path>
<path style="stroke:black" d="M305.280000,813534.960000 L305.100000,813535.080000 L304.860000,813534.660000 L305.040000,813534.540000 "></path>
<path style="stroke:black" d="M273.180000,813535.860000 L274.440000,813534.840000 L275.220000,813535.380000 L275.220000,813535.560000 L275.040000,813535.680000 L273.780000,813536.700000 "></path>
<path style="stroke:black" d="M197.700000,813536.520000 L198.720000,813537.780000 L193.140000,813538.140000 L197.700000,813534.900000 "></path>
<path style="stroke:black" d="M198.240000,813534.900000 L198.240000,813536.520000 L197.280000,813536.880000 L197.160000,813536.520000 L197.160000,813534.900000 "></path>
<path style="stroke:black" d="M270.240000,813535.560000 L270.000000,813535.080000 L269.040000,813535.560000 L269.280000,813536.040000 "></path>
<path style="stroke:black" d="M270.240000,813535.560000 L270.060000,813535.680000 L269.820000,813535.260000 L270.000000,813535.140000 "></path>
<path style="stroke:black" d="M235.620000,813536.040000 L235.380000,813535.560000 L234.420000,813535.920000 L234.660000,813536.400000 "></path>
<path style="stroke:black" d="M235.620000,813536.040000 L235.440000,813536.100000 L235.260000,813535.680000 L235.440000,813535.620000 "></path>
<path style="stroke:black" d="M198.780000,813536.400000 L198.660000,813535.920000 L197.640000,813536.280000 L197.760000,813536.760000 "></path>
<path style="stroke:black" d="M198.840000,813536.400000 L198.600000,813536.460000 L198.420000,813535.980000 L198.660000,813535.920000 "></path>
<text y="813549.526888" x="168.6607" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y7</text>
<text y="813549.526888" x="186.3609" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X7</text>
<text y="813549.526888" x="204.0016966" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y6</text>
<text y="813549.526888" x="222.7806816" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X6</text>
<text y="813549.526888" x="239.8221532" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y5</text>
<text y="813549.526888" x="258.1216782" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X5</text>
<text y="813549.526888" x="275.1" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y4</text>
<text y="813549.526888" x="294.42" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X4</text>
<text y="813487.187488" x="313.2586" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X7</text>
<text y="813487.187488" x="330.3561436" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X6</text>
<text y="813487.187488" x="349.6192482" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X5</text>
<text y="813487.187488" x="366.6585" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X4</text>
<text y="813487.247388" x="384.5391" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X3</text>
<text y="813487.247388" x="401.7005716" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X2</text>
<text y="813487.247388" x="420.8997482" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">X1</text>
<text y="813487.247388" x="437.939" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7226497">X0</text>
<text y="813487.847588" x="150.3597" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y7</text>
<text y="813487.847588" x="167.4572436" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y6</text>
<text y="813487.847588" x="186.7203482" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y5</text>
<text y="813487.847588" x="203.7595" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y4</text>
<text y="813488.447688" x="222.1796" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y3</text>
<text y="813488.447688" x="239.2771436" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y2</text>
<text y="813488.447688" x="258.5402482" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y1</text>
<text y="813488.447688" x="275.5795" style="font-size:7.991000pt" lengthAdjust="spacingAndGlyphs" textLength="9.7833813">Y0</text></svg>
<h3>Figure 4-20.  PUNPCKHBW Instruction Operation Using 64-bit Operands</h3>
<p>31</p>
<p>0</p>
<p>255</p>
<p>255</p>
<p>31</p>
<p>0</p>
<table class="exception-table">
<tr>
<td>X7</td>
<td>X6</td>
<td>X5</td>
<td>X4</td>
<td>X3</td>
<td>X2</td>
<td>X1</td>
<td>X0</td></tr></table>
<table class="exception-table">
<tr>
<td>Y7</td>
<td>Y6</td>
<td>Y5</td>
<td>Y4</td>
<td>Y3</td>
<td>Y2</td>
<td>Y1</td>
<td>Y0</td></tr></table>
<p>SRC</p>
<p>255</p>
<p>0</p>
<table class="exception-table">
<tr>
<td>Y7</td>
<td>X7</td>
<td>Y6</td>
<td>X6</td>
<td>Y3</td>
<td>X3</td>
<td>Y2</td>
<td>X2</td></tr></table>
<p>DEST</p>
<h3>Figure 4-21.  256-bit VPUNPCKHDQ Instruction Operation</h3>
<p>When the source data comes from a 64-bit memory operand, the full 64-bit operand is accessed from memory, but the instruction uses only the high-order 32 bits. When the source data comes from a 128-bit memory operand, an implementation may fetch only the appropriate 64 bits; however, alignment to a 16-byte boundary and normal segment checking will still be enforced.</p>
<p>The (V)PUNPCKHBW instruction interleaves the high-order bytes of the source and destination operands, the (V)PUNPCKHWD instruction interleaves the high-order words of the source and destination operands, the (V)PUNPCKHDQ instruction interleaves the high-order doubleword (or doublewords) of the source and destination operands, and the (V)PUNPCKHQDQ instruction interleaves the high-order quadwords of the source and destina-tion operands.</p>
<p>These instructions can be used to convert bytes to words, words to doublewords, doublewords to quadwords, and quadwords to double quadwords, respectively, by placing all 0s in the source operand. Here, if the source operand contains all 0s, the result (stored in the destination operand) contains zero extensions of the high-order data elements from the original value in the destination operand. For example, with the (V)PUNPCKHBW instruction the high-order bytes are zero extended (that is, unpacked into unsigned word integers), and with the (V)PUNPCKHWD instruction, the high-order words are zero extended (unpacked into unsigned doubleword integers).</p>
<p>In 64-bit mode and not encoded with VEX/EVEX, using a REX prefix in the form of REX.R permits this instruction to access additional registers (XMM8-XMM15).</p>
<p>Legacy SSE versions 64-bit operand: The source operand can be an MMX technology register or a 64-bit memory location. The destination operand is an MMX technology register.</p>
<p>128-bit Legacy SSE versions: The second source operand is an XMM register or a 128-bit memory location. The first source operand and destination operands are XMM registers. Bits (VLMAX-1:128) of the corresponding YMM destination register remain unchanged.</p>
<p>VEX.128 encoded versions: The second source operand is an XMM register or a 128-bit memory location. The first source operand and destination operands are XMM registers. Bits (VLMAX-1:128) of the destination YMM register are zeroed.</p>
<p>VEX.256 encoded version: The second source operand is an YMM register or an 256-bit memory location. The first source operand and destination operands are YMM registers.</p>
<p>EVEX encoded VPUNPCKHDQ/QDQ: The second source operand is a ZMM/YMM/XMM register, a 512/256/128-bit memory location or a 512/256/128-bit vector broadcasted from a 32/64-bit memory location. The first source operand and destination operands are ZMM/YMM/XMM registers. The destination is conditionally updated with writemask k1.</p>
<p>EVEX encoded VPUNPCKHWD/BW: The second source operand is a ZMM/YMM/XMM register, a 512/256/128-bit memory location. The first source operand and destination operands are ZMM/YMM/XMM registers. The destination is conditionally updated with writemask k1.</p>
<h2>Operation</h2>
<p><strong>PUNPCKHBW instruction with 64-bit operands:</strong></p>
<pre>    DEST[7:0] ← DEST[39:32];
    DEST[15:8] ← SRC[39:32];
    DEST[23:16] ← DEST[47:40];
    DEST[31:24] ← SRC[47:40];
    DEST[39:32] ← DEST[55:48];
    DEST[47:40] ← SRC[55:48];
    DEST[55:48] ← DEST[63:56];
    DEST[63:56] ← SRC[63:56];</pre>
<p><strong>PUNPCKHW instruction with 64-bit operands:</strong></p>
<pre>    DEST[15:0] ← DEST[47:32];
    DEST[31:16] ← SRC[47:32];
    DEST[47:32] ← DEST[63:48];
    DEST[63:48] ← SRC[63:48];</pre>
<p><strong>PUNPCKHDQ instruction with 64-bit operands:</strong></p>
<pre>    DEST[31:0] ← DEST[63:32];
    DEST[63:32] ← SRC[63:32];
INTERLEAVE_HIGH_BYTES_512b (SRC1, SRC2)
TMP_DEST[255:0] (cid:197) INTERLEAVE_HIGH_BYTES_256b(SRC1[255:0], SRC[255:0])
TMP_DEST[511:256] (cid:197) INTERLEAVE_HIGH_BYTES_256b(SRC1[511:256], SRC[511:256])
INTERLEAVE_HIGH_BYTES_256b (SRC1, SRC2)
DEST[7:0] (cid:197) SRC1[71:64]
DEST[15:8] (cid:197) SRC2[71:64]
DEST[23:16] (cid:197) SRC1[79:72]
DEST[31:24] (cid:197) SRC2[79:72]
DEST[39:32] (cid:197) SRC1[87:80]
DEST[47:40] (cid:197) SRC2[87:80]
DEST[55:48] (cid:197) SRC1[95:88]
DEST[63:56] (cid:197) SRC2[95:88]
DEST[71:64] (cid:197) SRC1[103:96]
DEST[79:72] (cid:197) SRC2[103:96]
DEST[87:80] (cid:197) SRC1[111:104]
DEST[95:88] (cid:197) SRC2[111:104]
DEST[103:96] (cid:197) SRC1[119:112]
DEST[111:104] (cid:197) SRC2[119:112]
DEST[119:112] (cid:197) SRC1[127:120]
DEST[127:120] (cid:197) SRC2[127:120]
DEST[135:128] (cid:197) SRC1[199:192]
DEST[143:136] (cid:197) SRC2[199:192]
DEST[151:144] (cid:197) SRC1[207:200]
DEST[159:152] (cid:197) SRC2[207:200]
DEST[167:160] (cid:197) SRC1[215:208]
DEST[175:168] (cid:197) SRC2[215:208]
DEST[183:176] (cid:197) SRC1[223:216]
DEST[191:184] (cid:197) SRC2[223:216]
DEST[199:192] (cid:197) SRC1[231:224]
DEST[207:200] (cid:197) SRC2[231:224]
DEST[215:208] (cid:197) SRC1[239:232]
DEST[223:216] (cid:197) SRC2[239:232]
DEST[231:224] (cid:197) SRC1[247:240]
DEST[239:232] (cid:197) SRC2[247:240]
DEST[247:240] (cid:197) SRC1[255:248]
DEST[255:248] (cid:197) SRC2[255:248]
INTERLEAVE_HIGH_BYTES (SRC1, SRC2)
DEST[7:0] (cid:197) SRC1[71:64]
DEST[15:8] (cid:197) SRC2[71:64]
DEST[23:16] (cid:197) SRC1[79:72]
DEST[31:24] (cid:197) SRC2[79:72]
DEST[39:32] (cid:197) SRC1[87:80]
DEST[47:40] (cid:197) SRC2[87:80]
DEST[55:48] (cid:197) SRC1[95:88]
DEST[63:56] (cid:197) SRC2[95:88]
DEST[71:64] (cid:197) SRC1[103:96]
DEST[79:72] (cid:197) SRC2[103:96]
DEST[87:80] (cid:197) SRC1[111:104]
DEST[95:88] (cid:197) SRC2[111:104]
DEST[103:96] (cid:197) SRC1[119:112]
DEST[111:104] (cid:197) SRC2[119:112]
DEST[119:112] (cid:197) SRC1[127:120]
DEST[127:120] (cid:197) SRC2[127:120]
INTERLEAVE_HIGH_WORDS_512b (SRC1, SRC2)
TMP_DEST[255:0] (cid:197) INTERLEAVE_HIGH_WORDS_256b(SRC1[255:0], SRC[255:0])
TMP_DEST[511:256] (cid:197) INTERLEAVE_HIGH_WORDS_256b(SRC1[511:256], SRC[511:256])
INTERLEAVE_HIGH_WORDS_256b(SRC1, SRC2)
DEST[15:0] (cid:197) SRC1[79:64]
DEST[31:16] (cid:197) SRC2[79:64]
DEST[47:32] (cid:197) SRC1[95:80]
DEST[63:48] (cid:197) SRC2[95:80]
DEST[79:64] (cid:197) SRC1[111:96]
DEST[95:80] (cid:197) SRC2[111:96]
DEST[111:96] (cid:197) SRC1[127:112]
DEST[127:112] (cid:197) SRC2[127:112]
DEST[143:128] (cid:197) SRC1[207:192]
DEST[159:144] (cid:197) SRC2[207:192]
DEST[175:160] (cid:197) SRC1[223:208]
DEST[191:176] (cid:197) SRC2[223:208]
DEST[207:192] (cid:197) SRC1[239:224]
DEST[223:208] (cid:197) SRC2[239:224]
DEST[239:224] (cid:197) SRC1[255:240]
DEST[255:240] (cid:197) SRC2[255:240]
INTERLEAVE_HIGH_WORDS (SRC1, SRC2)
DEST[15:0] (cid:197) SRC1[79:64]
DEST[31:16] (cid:197) SRC2[79:64]
DEST[47:32] (cid:197) SRC1[95:80]
DEST[63:48] (cid:197) SRC2[95:80]
DEST[79:64] (cid:197) SRC1[111:96]
DEST[95:80] (cid:197) SRC2[111:96]
DEST[111:96] (cid:197) SRC1[127:112]
DEST[127:112] (cid:197) SRC2[127:112]
INTERLEAVE_HIGH_DWORDS_512b (SRC1, SRC2)
TMP_DEST[255:0] (cid:197) INTERLEAVE_HIGH_DWORDS_256b(SRC1[255:0], SRC2[255:0])
TMP_DEST[511:256] (cid:197) INTERLEAVE_HIGH_DWORDS_256b(SRC1[511:256], SRC2[511:256])
INTERLEAVE_HIGH_DWORDS_256b(SRC1, SRC2)
DEST[31:0] (cid:197) SRC1[95:64]
DEST[63:32] (cid:197) SRC2[95:64]
DEST[95:64] (cid:197) SRC1[127:96]
DEST[127:96] (cid:197) SRC2[127:96]
DEST[159:128] (cid:197) SRC1[223:192]
DEST[191:160] (cid:197) SRC2[223:192]
DEST[223:192] (cid:197) SRC1[255:224]
DEST[255:224] (cid:197) SRC2[255:224]
INTERLEAVE_HIGH_DWORDS(SRC1, SRC2)
DEST[31:0] (cid:197) SRC1[95:64]
DEST[63:32] (cid:197) SRC2[95:64]
DEST[95:64] (cid:197) SRC1[127:96]
DEST[127:96] (cid:197) SRC2[127:96]
INTERLEAVE_HIGH_QWORDS_512b (SRC1, SRC2)
TMP_DEST[255:0] (cid:197) INTERLEAVE_HIGH_QWORDS_256b(SRC1[255:0], SRC2[255:0])
TMP_DEST[511:256] (cid:197) INTERLEAVE_HIGH_QWORDS_256b(SRC1[511:256], SRC2[511:256])
INTERLEAVE_HIGH_QWORDS_256b(SRC1, SRC2)
DEST[63:0] (cid:197) SRC1[127:64]
DEST[127:64] (cid:197) SRC2[127:64]
DEST[191:128] (cid:197) SRC1[255:192]
DEST[255:192] (cid:197) SRC2[255:192]
INTERLEAVE_HIGH_QWORDS(SRC1, SRC2)
DEST[63:0] (cid:197) SRC1[127:64]
DEST[127:64] (cid:197) SRC2[127:64]</pre>
<p><strong>PUNPCKHBW (128-bit Legacy SSE Version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_BYTES(DEST, SRC)
DEST[255:127] (Unmodified) VPUNPCKHBW (VEX.128 encoded version)
DEST[127:0] (cid:197)INTERLEAVE_HIGH_BYTES(SRC1, SRC2)
DEST[511:127] (cid:197)0</pre>
<p><strong>VPUNPCKHBW (VEX.256 encoded version)</strong></p>
<pre>DEST[255:0] (cid:197)INTERLEAVE_HIGH_BYTES_256b(SRC1, SRC2)
DEST[MAX_VL-1:256] (cid:197)0</pre>
<p><strong>VPUNPCKHBW (EVEX encoded versions)</strong></p>
<pre>(KL, VL) = (16, 128), (32, 256), (64, 512)
IF VL = 128
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_BYTES(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
IF VL = 256
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_BYTES_256b(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
IF VL = 512
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_BYTES_512b(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 8
    IF k1[j] OR *no writemask*
         THEN DEST[i+7:i] (cid:197) TMP_DEST[i+7:i]
         ELSE
              IF *merging-masking*
                                                         ; merging-masking
                    THEN *DEST[i+7:i] remains unchanged*
                    ELSE *zeroing-masking*
                                                               ; zeroing-masking
                         DEST[i+7:i] (cid:197) 0
              FI
    FI;
ENDFOR
DEST[MAX_VL-1:VL] (cid:197) 0</pre>
<p><strong>PUNPCKHWD (128-bit Legacy SSE Version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_WORDS(DEST, SRC)
DEST[255:127] (Unmodified)</pre>
<p><strong>VPUNPCKHWD (VEX.128 encoded version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_WORDS(SRC1, SRC2)
DEST[511:127] (cid:197)0</pre>
<p><strong>VPUNPCKHWD (VEX.256 encoded version)</strong></p>
<pre>DEST[255:0] (cid:197)INTERLEAVE_HIGH_WORDS_256b(SRC1, SRC2)
DEST[MAX_VL-1:256] (cid:197)0
VPUNPCKHWD (EVEX encoded versions)
(KL, VL) = (8, 128), (16, 256), (32, 512)
IF VL = 128
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_WORDS(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
IF VL = 256
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_WORDS_256b(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
IF VL = 512
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_WORDS_512b(SRC1[VL-1:0], SRC2[VL-1:0])
FI;
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 16
    IF k1[j] OR *no writemask*
         THEN DEST[i+15:i] (cid:197) TMP_DEST[i+15:i]
         ELSE
              IF *merging-masking*
                                                         ; merging-masking
                    THEN *DEST[i+15:i] remains unchanged*
                    ELSE *zeroing-masking*
                                                              ; zeroing-masking
                         DEST[i+15:i] (cid:197) 0
              FI
    FI;
ENDFOR
DEST[MAX_VL-1:VL] (cid:197) 0</pre>
<p><strong>PUNPCKHDQ (128-bit Legacy SSE Version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_DWORDS(DEST, SRC)
DEST[255:127] (Unmodified)</pre>
<p><strong>VPUNPCKHDQ (VEX.128 encoded version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_DWORDS(SRC1, SRC2)
DEST[511:127] (cid:197)0</pre>
<p><strong>VPUNPCKHDQ (VEX.256 encoded version)</strong></p>
<pre>DEST[255:0] (cid:197)INTERLEAVE_HIGH_DWORDS_256b(SRC1, SRC2)
DEST[MAX_VL-1:256] (cid:197)0</pre>
<p><strong>VPUNPCKHDQ (EVEX.512 encoded version)</strong></p>
<pre>(KL, VL) = (4, 128), (8, 256), (16, 512)
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 32
    IF (EVEX.b = 1) AND (SRC2 *is memory*)
         THEN TMP_SRC2[i+31:i] (cid:197) SRC2[31:0]
         ELSE TMP_SRC2[i+31:i] (cid:197) SRC2[i+31:i]
    FI;
ENDFOR;
IF VL = 128
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_DWORDS(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
IF VL = 256
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_DWORDS_256b(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
IF VL = 512
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_DWORDS_512b(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 32
    IF k1[j] OR *no writemask*
         THEN DEST[i+31:i] (cid:197) TMP_DEST[i+31:i]
         ELSE
              IF *merging-masking*
                                                         ; merging-masking
                    THEN *DEST[i+31:i] remains unchanged*
                    ELSE *zeroing-masking*
                                                              ; zeroing-masking
                         DEST[i+31:i] (cid:197) 0
              FI
    FI;
ENDFOR
DEST[MAX_VL-1:VL] (cid:197) 0</pre>
<p><strong>PUNPCKHQDQ (128-bit Legacy SSE Version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_QWORDS(DEST, SRC)
DEST[MAX_VL-1:128] (Unmodified)</pre>
<p><strong>VPUNPCKHQDQ (VEX.128 encoded version)</strong></p>
<pre>DEST[127:0] (cid:197)INTERLEAVE_HIGH_QWORDS(SRC1, SRC2)
DEST[MAX_VL-1:128] (cid:197)0</pre>
<p><strong>VPUNPCKHQDQ (VEX.256 encoded version)</strong></p>
<pre>DEST[255:0] (cid:197)INTERLEAVE_HIGH_QWORDS_256b(SRC1, SRC2)
DEST[MAX_VL-1:256] (cid:197)0</pre>
<p><strong>VPUNPCKHQDQ (EVEX encoded versions)</strong></p>
<pre>(KL, VL) = (2, 128), (4, 256), (8, 512)
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 64
    IF (EVEX.b = 1) AND (SRC2 *is memory*)
         THEN TMP_SRC2[i+63:i] (cid:197) SRC2[63:0]
         ELSE TMP_SRC2[i+63:i] (cid:197) SRC2[i+63:i]
    FI;
ENDFOR;
IF VL = 128
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_QWORDS(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
IF VL = 256
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_QWORDS_256b(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
IF VL = 512
    TMP_DEST[VL-1:0] (cid:197) INTERLEAVE_HIGH_QWORDS_512b(SRC1[VL-1:0], TMP_SRC2[VL-1:0])
FI;
FOR j (cid:197) 0 TO KL-1
    i (cid:197) j * 64
    IF k1[j] OR *no writemask*
         THEN DEST[i+63:i] (cid:197) TMP_DEST[i+63:i]
         ELSE
              IF *merging-masking*
                                                         ; merging-masking
                    THEN *DEST[i+63:i] remains unchanged*
                    ELSE *zeroing-masking*
                                                               ; zeroing-masking
                         DEST[i+63:i] (cid:197) 0
              FI
    FI;
ENDFOR
DEST[MAX_VL-1:VL] (cid:197) 0</pre>
<h2>Intel C/C++ Compiler Intrinsic Equivalents</h2>
<p>VPUNPCKHBW __m512i _mm512_unpackhi_epi8(__m512i a, __m512i b);</p>
<p>VPUNPCKHBW __m512i _mm512_mask_unpackhi_epi8(__m512i s, __mmask64 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHBW __m512i _mm512_maskz_unpackhi_epi8( __mmask64 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHBW __m256i _mm256_mask_unpackhi_epi8(__m256i s, __mmask32 k, __m256i a, __m256i b);</p>
<p>VPUNPCKHBW __m256i _mm256_maskz_unpackhi_epi8( __mmask32 k, __m256i a, __m256i b);</p>
<p>VPUNPCKHBW __m128i _mm_mask_unpackhi_epi8(v s, __mmask16 k, __m128i a, __m128i b);</p>
<p>VPUNPCKHBW __m128i _mm_maskz_unpackhi_epi8( __mmask16 k, __m128i a, __m128i b);</p>
<p>VPUNPCKHWD __m512i _mm512_unpackhi_epi16(__m512i a, __m512i b);</p>
<p>VPUNPCKHWD __m512i _mm512_mask_unpackhi_epi16(__m512i s, __mmask32 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHWD __m512i _mm512_maskz_unpackhi_epi16( __mmask32 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHWD __m256i _mm256_mask_unpackhi_epi16(__m256i s, __mmask16 k, __m256i a, __m256i b);</p>
<p>VPUNPCKHWD __m256i _mm256_maskz_unpackhi_epi16( __mmask16 k, __m256i a, __m256i b);</p>
<p>VPUNPCKHWD __m128i _mm_mask_unpackhi_epi16(v s, __mmask8 k, __m128i a, __m128i b);</p>
<p>VPUNPCKHWD __m128i _mm_maskz_unpackhi_epi16( __mmask8 k, __m128i a, __m128i b);</p>
<p>VPUNPCKHDQ __m512i _mm512_unpackhi_epi32(__m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m512i _mm512_mask_unpackhi_epi32(__m512i s, __mmask16 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m512i _mm512_maskz_unpackhi_epi32( __mmask16 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m256i _mm256_mask_unpackhi_epi32(__m512i s, __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m256i _mm256_maskz_unpackhi_epi32( __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m128i _mm_mask_unpackhi_epi32(__m512i s, __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHDQ __m128i _mm_maskz_unpackhi_epi32( __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m512i _mm512_unpackhi_epi64(__m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m512i _mm512_mask_unpackhi_epi64(__m512i s, __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m512i _mm512_maskz_unpackhi_epi64( __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m256i _mm256_mask_unpackhi_epi64(__m512i s, __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m256i _mm256_maskz_unpackhi_epi64( __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m128i _mm_mask_unpackhi_epi64(__m512i s, __mmask8 k, __m512i a, __m512i b);</p>
<p>VPUNPCKHQDQ __m128i _mm_maskz_unpackhi_epi64( __mmask8 k, __m512i a, __m512i b);</p>
<p>PUNPCKHBW:__m64 _mm_unpackhi_pi8(__m64 m1, __m64 m2)</p>
<p>(V)PUNPCKHBW:__m128i _mm_unpackhi_epi8(__m128i m1, __m128i m2)</p>
<p>VPUNPCKHBW:__m256i _mm256_unpackhi_epi8(__m256i m1, __m256i m2)</p>
<p>PUNPCKHWD:__m64 _mm_unpackhi_pi16(__m64 m1,__m64 m2)</p>
<p>(V)PUNPCKHWD:__m128i _mm_unpackhi_epi16(__m128i m1,__m128i m2)</p>
<p>VPUNPCKHWD:__m256i _mm256_unpackhi_epi16(__m256i m1,__m256i m2)</p>
<p>PUNPCKHDQ:__m64 _mm_unpackhi_pi32(__m64 m1, __m64 m2)</p>
<p>(V)PUNPCKHDQ:__m128i _mm_unpackhi_epi32(__m128i m1, __m128i m2)</p>
<p>VPUNPCKHDQ:__m256i _mm256_unpackhi_epi32(__m256i m1, __m256i m2)</p>
<p>(V)PUNPCKHQDQ:__m128i _mm_unpackhi_epi64 ( __m128i a, __m128i b)</p>
<p>VPUNPCKHQDQ:__m256i _mm256_unpackhi_epi64 ( __m256i a, __m256i b)</p>
<h2>Flags Affected</h2>
<p>None.</p>
<h2>Numeric Exceptions</h2>
<p>None.</p>
<h2>Other Exceptions</h2>
<p>Non-EVEX-encoded instruction, see Exceptions Type 4.</p>
<table class="exception-table">
<tr>
<td>EVEX-encoded VPUNPCKHQDQ/QDQ, see Exceptions Type E4NF.</td></tr>
<tr>
<td>EVEX-encoded VPUNPCKHBW/WD, see Exceptions Type E4NF.nb.</td></tr></table></body></html>